<!-- Modal -->
<div class="modal fade" id="addFileModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Add a new file</h4>
      </div>
      <div class="modal-body">
        <form>
          <div class="form-group">
            <label for="newFileName" val=''>File name</label>
            <input type="text" class="form-control" id="newFileName" placeholder="Enter name">
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" onclick='submitNewFile()' class="btn btn-primary">Create File</button>
      </div>
    </div>
  </div>
</div>
<script>
  function submitNewFile()
  {
    var fileName = $('#newFileName').val();
    if(fileName == '')
    {
      alert('Please input a name for the new file.');
    }
    else
    {
      createFile(fileName);
    }
 
  }
</script>